package com.leadingsoft.pwxk.converter;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.leadingsoft.common.converter.AbstractConverter;
import com.leadingsoft.pwxk.dto.ProductFaciDto;
import com.leadingsoft.pwxk.model.ProductFaci;

/**
 * @author: lipan 2018年5月15日
 * @description: ()
 * 
 */

@Component
public class ProductFaciConverter extends AbstractConverter<ProductFaci, ProductFaciDto> {

	@Autowired
	private ProductParamConverter productParamConverter;

	@Override
	protected ProductFaciDto toDtoActual(ProductFaci model) {

		ProductFaciDto dto = new ProductFaciDto();
		dto.setId(model.getId());
		dto.setDataid(model.getDataid());
		dto.setCwssname(model.getCwssname());
		dto.setDevicename(model.getDevicename());
		dto.setFid(model.getFid());
		dto.setIssecretname(model.getIssecretname());
		dto.setProductcontent(model.getProductcontent());
		dto.setTechnicsidandname(model.getTechnicsidandname());
		dto.setTechnicsnumber(model.getTechnicsnumber());
		dto.setXkdevicecode(model.getXkdevicecode());
		dto.setProductparamlist(productParamConverter.toDto(model.getProductParamList()));
		return dto;
	}

	@Override
	public void copyProperties(ProductFaci model, ProductFaciDto dto) {

	}

}
